Clover coverage report - Prayer Portlets - 0.1-rc4-SNAPSHOT
Coverage timestamp: Thu Aug 19 2004 18:34:34 EDT
file stats: LOC: 186   Methods: 20
NCLOC: 92   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
PrayerRequest.java 62.5% 96.8% 100% 93.2%
coverage coverage
 1   
 /*
 2   
  * Created on Jul 23, 2004
 3   
  */
 4   
 package org.marketchangers.prayer;
 5   
 
 6   
 import java.util.Date;
 7   
 
 8   
 /**
 9   
  * @author Jason Williams
 10   
  * @hibernate.class  table="PrayerRequests"
 11   
  */
 12   
 public class PrayerRequest extends PersistentObject {
 13   
 
 14   
     private String status;
 15   
     private String subject;
 16   
     private String content;
 17   
     private Date startDate;
 18   
     private Date endDate;
 19   
     private String background;
 20   
     private PrayerCategory category;
 21   
     private String requestorUserId;
 22   
 
 23   
     // status constants
 24   
     public static final String OPEN = "open";
 25   
     public static final String CLOSED = "closed";
 26   
 
 27   
     /**
 28   
      * @hibernate.property
 29   
      * @return
 30   
      */
 31  28
     public String getBackground() {
 32  28
         return background;
 33   
     }
 34   
 
 35   
     /**
 36   
      * @hibernate.many-to-one
 37   
      *             class="org.marketchangers.prayer.PrayerCategory"
 38   
      * @return
 39   
      */
 40  40
     public PrayerCategory getCategory() {
 41  40
         return category;
 42   
     }
 43   
 
 44   
     /**
 45   
      * @hibernate.property
 46   
      * @return
 47   
      */
 48  40
     public String getContent() {
 49  40
         return content;
 50   
     }
 51   
 
 52   
     /**
 53   
      * @hibernate.property
 54   
      * @return
 55   
      */
 56  40
     public Date getEndDate() {
 57  40
         return endDate;
 58   
     }
 59   
 
 60   
     /**
 61   
      * @hibernate.property
 62   
      * @return
 63   
      */
 64  40
     public Date getStartDate() {
 65  40
         return startDate;
 66   
     }
 67   
 
 68   
     /**
 69   
      * @hibernate.property
 70   
      * @return
 71   
      */
 72  30
     public String getStatus() {
 73  30
         return status;
 74   
     }
 75   
 
 76   
     /**
 77   
      * @hibernate.property
 78   
      * @return
 79   
      */
 80  28
     public String getSubject() {
 81  28
         return subject;
 82   
     }
 83   
 
 84   
     /**
 85   
      * @param string
 86   
      */
 87  22
     public void setBackground(String string) {
 88  22
         background = string;
 89   
     }
 90   
 
 91   
     /**
 92   
      * @param category
 93   
      */
 94  14
     public void setCategory(PrayerCategory category) {
 95  14
         this.category = category;
 96   
     }
 97   
 
 98   
     /**
 99   
      * @param string
 100   
      */
 101  26
     public void setContent(String string) {
 102  26
         content = string;
 103   
     }
 104   
 
 105   
     /**
 106   
      * @param date
 107   
      */
 108  26
     public void setEndDate(Date date) {
 109  26
         endDate = date;
 110   
     }
 111   
 
 112   
     /**
 113   
      * @param date
 114   
      */
 115  26
     public void setStartDate(Date date) {
 116  26
         startDate = date;
 117   
     }
 118   
 
 119   
     /**
 120   
      * @param string
 121   
      */
 122  30
     public void setStatus(String string) {
 123  30
         status = string;
 124   
     }
 125   
 
 126   
     /**
 127   
      * @param string
 128   
      */
 129  22
     public void setSubject(String string) {
 130  22
         subject = string;
 131   
     }
 132   
 
 133  26
     public boolean equals(Object o) {
 134  26
         if (o == this) {
 135  24
             return true;
 136   
         }
 137   
 
 138  2
         if (!(o instanceof PrayerRequest)) {
 139  0
             return false;
 140   
         }
 141   
 
 142  2
         PrayerRequest other = (PrayerRequest) o;
 143  2
         return equals(this.background, other.background)
 144   
             && equals(this.category, other.category)
 145   
             && equals(this.content, other.content)
 146   
             && equals(this.startDate, other.startDate)
 147   
             && equals(this.endDate, other.endDate)
 148   
             && equals(this.requestorUserId, other.requestorUserId);
 149   
     }
 150   
 
 151  12
     private boolean equals(Object lhs, Object rhs) {
 152  12
         return lhs == null ? rhs == null : lhs.equals(rhs);
 153   
     }
 154   
 
 155  2
     public int hashCode() {
 156  2
         int result = 10;
 157  2
         result = result * 37 + hashCode(background);
 158  2
         result = result * 37 + hashCode(content);
 159  2
         result = result * 37 + hashCode(category);
 160  2
         result = result * 37 + hashCode(startDate);
 161  2
         result = result * 37 + hashCode(endDate);
 162   
 
 163  2
         return result;
 164   
     }
 165   
 
 166  10
     private int hashCode(Object o) {
 167  10
         return o == null ? 0 : o.hashCode();
 168   
     }
 169   
 
 170   
     /**
 171   
      * @hibernate.property
 172   
      * @return
 173   
      */
 174  50
     public String getRequestorUserId() {
 175  50
         return requestorUserId;
 176   
     }
 177   
 
 178   
     /**
 179   
      * @param string
 180   
      */
 181  34
     public void setRequestorUserId(String string) {
 182  34
         requestorUserId = string;
 183   
     }
 184   
 
 185   
 }
 186